package com.ruoyi.assignmentsubmission.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.assignmentsubmission.mapper.AssignmentsubmissionMapper;
import com.ruoyi.assignmentsubmission.domain.Assignmentsubmission;
import com.ruoyi.assignmentsubmission.service.IAssignmentsubmissionService;

/**
 * 学生作业提交Service业务层处理
 *
 * @author dongyv
 * @date 2025-05-15
 */
@Service
public class AssignmentsubmissionServiceImpl implements IAssignmentsubmissionService
{
    @Autowired
    private AssignmentsubmissionMapper assignmentsubmissionMapper;

    /**
     * 查询学生作业提交
     *
     * @param submissionId 学生作业提交主键
     * @return 学生作业提交
     */
    @Override
    public Assignmentsubmission selectAssignmentsubmissionBySubmissionId(Long submissionId)
    {
        return assignmentsubmissionMapper.selectAssignmentsubmissionBySubmissionId(submissionId);
    }

    /**
     * 查询学生作业提交列表
     *
     * @param assignmentsubmission 学生作业提交
     * @return 学生作业提交
     */
    @Override
    public List<Assignmentsubmission> selectAssignmentsubmissionList(Assignmentsubmission assignmentsubmission)
    {
        return assignmentsubmissionMapper.selectAssignmentsubmissionList(assignmentsubmission);
    }

    /**
     * 新增学生作业提交
     *
     * @param assignmentsubmission 学生作业提交
     * @return 结果
     */
    @Override
    public int insertAssignmentsubmission(Assignmentsubmission assignmentsubmission)
    {
        return assignmentsubmissionMapper.insertAssignmentsubmission(assignmentsubmission);
    }

    /**
     * 修改学生作业提交
     *
     * @param assignmentsubmission 学生作业提交
     * @return 结果
     */
    @Override
    public int updateAssignmentsubmission(Assignmentsubmission assignmentsubmission)
    {
        return assignmentsubmissionMapper.updateAssignmentsubmission(assignmentsubmission);
    }

    /**
     * 批量删除学生作业提交
     *
     * @param submissionIds 需要删除的学生作业提交主键
     * @return 结果
     */
    @Override
    public int deleteAssignmentsubmissionBySubmissionIds(Long[] submissionIds)
    {
        return assignmentsubmissionMapper.deleteAssignmentsubmissionBySubmissionIds(submissionIds);
    }

    /**
     * 删除学生作业提交信息
     *
     * @param submissionId 学生作业提交主键
     * @return 结果
     */
    @Override
    public int deleteAssignmentsubmissionBySubmissionId(Long submissionId)
    {
        return assignmentsubmissionMapper.deleteAssignmentsubmissionBySubmissionId(submissionId);
    }

    @Override
    public List<Assignmentsubmission> selectAssignmentsubmissionList_student(String teacherId) {
        return assignmentsubmissionMapper.selectAssignmentsubmissionList_student(teacherId);
    }
}
